@extends('layouts.accountmanage')

@section('title', '找回密码')

@section('header')
	@include('layouts.header-three')
@endsection

@section('content')
<div class="wrapper-box">			
	<div class="container">	
		<div class="telRevise">
			<h2>找回密码</h2>
			<div class="telRevise-process fpwd-process fpwd-process1">
	        	<ul>
	            	<li class="indent5 processActive">填写用户名</li>
	                <li class="indent5">验真身份</li>
	                <li class="indent5">设置新密码</li>
	                <li class="indent5">完成</li>				                
	            </ul>
	        </div>	
			<div class="telRevise-form find-pwd-form">
				<form class="form-horizontal" action="{{ route('postVerifyAccount') }}" method="post">
				  	{{ csrf_field() }}
				  	<div class="form-group">
				    	<label class="col-sm-4 control-label">用户名：</label>
					    <div class="col-sm-8">
						    <input type="text" class="form-control" name="name" placeholder="6-20位中文、数字或字母" value="{{ \Request::old('name') }}" style="width: 180px;">
						    @if ($errors->has('name'))
								<span class="error">
									<strong>{{ $errors->first('name') }}</strong>
								</span>
							@endif
					    </div>
				  	</div>
				  	<div class="form-group">
				    	<label class="col-sm-4 control-label">验证码：</label>
					    <div class="col-sm-8">
							<input type="text" class="form-control" name="code" placeholder="请输入验证码" maxlength="6" required/>
		                    <a class="yzm" onclick="javascript:re_captcha();">
			                   <img src="{{captcha_src()}}" alt="验证码" title="刷新图片" width="100" height="34" id="captcha">
			                </a>
							@if ($errors->has('code'))
								<span class="error">
								{{ $errors->first('code') }}
							</span>
							@endif
					    </div>
				  	</div>				  	
					<div class="form-group">
					    <div class="col-sm-12">
					      	<button type="submit" class="reguesterBtn">下一步</button>
					    </div>
				  	</div>							  	
				</form>						
			</div>				        
		</div>					
	</div>
</div>
@endsection

@section('script')
<script src="{{ asset('statics/js/jplaceholder.js') }}" ></script>
<script src="{{ asset('statics/js/from.js') }}" ></script>
<script>
    function re_captcha() {
        $url = "{{ captcha_src() }}";
        $url = $url + "/" + Math.random();
        document.getElementById('captcha').src = $url;
    }
    $("form").submit(function(){
        var f=true;//假设通过
        if(checkName()==false) f=false;
        return f;
    });
</script>
@endsection

@section('footer')
	@include('layouts.footer')
@endsection
